Class SessionContext

All Implemented Interfaces:
Serializable, Cloneable, Map<Object,Object>

public class SessionContext extends Hashtable<Object,Object>
This class specifies the context object that includes authentication environment and connection information. This object is later used in access control evaluation. This is a global object that can be accessible throughout the server. It is useful for passing global and per-thread infomration in methods.

Version:
$Revision$, $Date$
See Also:
  • Field Details

  • Constructor Details

    • SessionContext

      public SessionContext()
      Constructs a session context.
  • Method Details

    • setContext

      public static void setContext(SessionContext sc)
      Sets the current context. This allows the caller to associate a specific session context with the current thread. This methods makes custom session context possible.
      Parameters:
      sc - session context
    • getContext

      public static SessionContext getContext()
      Retrieves the session context associated with the current thread. If no context is associated, a context is created.
      Returns:
      sesssion context
    • getExistingContext

      public static SessionContext getExistingContext()
      Retrieves the session context associated with the current thread. If no context is associated, null is returned.
      Returns:
      sesssion context
    • releaseContext

      public static void releaseContext()
      Releases the current session context.